//=============================================================
// 创建人:            admin
// 创建时间:          2024/8/25
// 邮箱：             admin@example.com
//==============================================================
using LF.Domain.Entities;

namespace LF.Domain.Services
{
    public interface IKnowledgeBaseManagerService : IDomainService
    {
        #region 知识库管理
        /// <summary>
        /// 获取知识库列表
        /// </summary>
        /// <param name="index">页码</param>
        /// <param name="pageSize">每页条数</param>
        /// <param name="name">知识库名称</param>
        /// <param name="active">是否启用</param>
        /// <returns>知识库列表</returns>
        List<KnowledgeBase> GetKnowledgeBaseList(int index, int pageSize, string? name, bool? active);

        /// <summary>
        /// 获取知识库总数
        /// </summary>
        /// <param name="name">知识库名称</param>
        /// <param name="active">是否启用</param>
        /// <returns>总数</returns>
        long CountKnowledgeBase(string? name, bool? active);

        /// <summary>
        /// 获取知识库详情
        /// </summary>
        /// <param name="id">知识库ID</param>
        /// <returns>知识库</returns>
        KnowledgeBase GetKnowledgeBase(Guid id);

        /// <summary>
        /// 新增知识库
        /// </summary>
        /// <param name="knowledgeBase">知识库</param>
        /// <returns>是否成功</returns>
        bool InsertKnowledgeBase(KnowledgeBase knowledgeBase);

        /// <summary>
        /// 更新知识库
        /// </summary>
        /// <param name="knowledgeBase">知识库</param>
        /// <returns>是否成功</returns>
        bool UpdateKnowledgeBase(KnowledgeBase knowledgeBase);

        /// <summary>
        /// 删除知识库
        /// </summary>
        /// <param name="id">知识库ID</param>
        /// <returns>是否成功</returns>
        bool DeleteKnowledgeBase(Guid id);

        /// <summary>
        /// 获取所有知识库
        /// </summary>
        /// <returns>所有知识库</returns>
        List<KnowledgeBase> GetAllKnowledgeBase();
        #endregion

        #region 知识库文件管理
        /// <summary>
        /// 获取知识库文件列表
        /// </summary>
        /// <param name="index">页码</param>
        /// <param name="pageSize">每页条数</param>
        /// <param name="knowledgeBaseId">知识库ID</param>
        /// <param name="fileName">文件名</param>
        /// <param name="suffix">文件后缀</param>
        /// <returns>知识库文件列表</returns>
        List<KnowledgeFile> GetKnowledgeFileList(int index, int pageSize, Guid? knowledgeBaseId, string? fileName, string? suffix);

        /// <summary>
        /// 获取知识库文件总数
        /// </summary>
        /// <param name="knowledgeBaseId">知识库ID</param>
        /// <param name="fileName">文件名</param>
        /// <param name="suffix">文件后缀</param>
        /// <returns>总数</returns>
        long CountKnowledgeFile(Guid? knowledgeBaseId, string? fileName, string? suffix);

        /// <summary>
        /// 获取知识库文件详情
        /// </summary>
        /// <param name="id">知识库文件ID</param>
        /// <returns>知识库文件</returns>
        KnowledgeFile GetKnowledgeFile(Guid id);

        /// <summary>
        /// 新增知识库文件
        /// </summary>
        /// <param name="knowledgeFile">知识库文件</param>
        /// <returns>是否成功</returns>
        bool InsertKnowledgeFile(KnowledgeFile knowledgeFile);

        /// <summary>
        /// 更新知识库文件
        /// </summary>
        /// <param name="knowledgeFile">知识库文件</param>
        /// <returns>是否成功</returns>
        bool UpdateKnowledgeFile(KnowledgeFile knowledgeFile);

        /// <summary>
        /// 删除知识库文件
        /// </summary>
        /// <param name="id">知识库文件ID</param>
        /// <returns>是否成功</returns>
        bool DeleteKnowledgeFile(Guid id);
        #endregion
    }
} 